const express = require('express');
const ejs = require('ejs');

let app = express();

app.set('views',__dirname+'/views');
app.engine('html',ejs.renderFile);

let {heros} = require('./data/lol.json');


app.use(express.static(__dirname+'/public'));

app.get('/',(req,res)=>{
    res.render('index.html',{heros});
})

app.listen(80,()=>{
    console.log('启动成功');
})